/*
********************************************************************************
* Copyright (C) 2021, xiang.D <dx_65535@163.com>.
* All right reserved.
*
* File Name   : log_2_terminal.h
* Author      :
* Version     : V1.0
* Description :
* Journal     : 2021-12-17 version v1.0
* Brief       : Blog: https://blog.csdn.net/qq_38750572?spm=1001.2014.3001.5343
* Others      :
                Compile command: make
********************************************************************************
*/
#ifndef __LOG_2_TERMINAL_H__
#define __LOG_2_TERMINAL_H__

#include "custom_log.h"
#include "log_base.h"

// 将log实时打印到终端
// 1. 区分log等级
class CLog2Terminal : public CCustomLog
{
public:
    explicit CLog2Terminal(CLogBase *pLog) : CCustomLog(pLog)
    {}

    virtual ~CLog2Terminal()
    {}

    static CLog2Terminal* GetInstance(CLogBase *pLog);

    virtual int WriteLog(const char *tag, const char *msg);

    virtual int SetLogLevel(int level);

};

#endif